/*
 * 文件名称: Obj.java
 * 版权信息: Copyright 2001-2012 ZheJiang Collaboration Data System Co., LTD. All right reserved.
 * ----------------------------------------------------------------------------------------------
 * 修改历史:
 * ----------------------------------------------------------------------------------------------
 * 修改原因: 新增
 * 修改人员: huangwb
 * 修改日期: 2012-2-16
 * 修改内容: 
 */
package com.huangwb.person.bean;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 
 * @author <a href="mailto:huangwb@zjcds.com">huangwb</a> created on 2012-2-16
 * @since DE6.0
 */
public class Obj {
    private String pak;
    private String className;
    private String tableName;
    private String primaryKey;
    private List<Prop> props;
    private String jdbcPK;
    
    
    //----------------------------//
    private Date date = new Date();
    private String propTypeStr;
    private String propNameStr;
    
    public void initProps() {
        String[] strArr = propNameStr.split(",");
        String[] strTypeArr = propTypeStr.split(",");
        if(strArr.length != strTypeArr.length) {
            throw new RuntimeException("Number of Prop type and name not equal.");
        }
        props = new ArrayList<Prop>();
        for (int i=0;i<strArr.length;i++) {
            props.add(new Prop(strTypeArr[i],strArr[i]));
        }
    }
    
    public String getClassName() {
        return className;
    }
    
    public void setClassName(String className) {
        this.className = className;
    }
    
    public List<Prop> getProps() {
        return props;
    }
    
    public void setProps(List<Prop> props) {
        this.props = props;
    }

    public void setPropNameStr(String propNameStr) {
        this.propNameStr = propNameStr;
    }

    public String getPropNameStr() {
        return propNameStr;
    }

    public void setPropTypeStr(String propTypeStr) {
        this.propTypeStr = propTypeStr;
    }

    public String getPropTypeStr() {
        return propTypeStr;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableName() {
        return tableName;
    }

    public void setPrimaryKey(String primaryKey) {
        this.primaryKey = primaryKey;
    }

    public String getPrimaryKey() {
        return primaryKey;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getDate() {
        return date;
    }

    public void setPak(String pak) {
        this.pak = pak;
    }

    public String getPak() {
        return pak;
    }

    public void setJdbcPK(String jdbcPK) {
        this.jdbcPK = jdbcPK;
    }

    public String getJdbcPK() {
        return jdbcPK;
    }



    
}
